package com.pvdnc.xdynamic.loader.mirror.android.app;

import android.app.Activity;
import android.app.Application;
import android.app.Service;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.os.IBinder;
import android.util.ArrayMap;

import com.pvdnc.vreflect.MethodParams;
import com.pvdnc.vreflect.MethodReflectParams;
import com.pvdnc.vreflect.RefClass;
import com.pvdnc.vreflect.RefInt;
import com.pvdnc.vreflect.RefMethod;
import com.pvdnc.vreflect.RefObject;
import com.pvdnc.vreflect.RefStaticMethod;
import com.pvdnc.vreflect.RefStaticObject;

public class ActivityThread {
    public static final Class<?> TYPE= RefClass.load(ActivityThread.class,
            "android.app.ActivityThread");

    public static RefStaticObject<?> sCurrentActivityThread;

    public static RefStaticMethod<Application> currentApplication;

    public static RefObject<ArrayMap<IBinder, Service>> mServices;

    public static RefObject<ArrayMap<IBinder, Object>> mActivities;

    //public final LoadedApk getPackageInfoNoCheck(ApplicationInfo ai,
    //            CompatibilityInfo compatInfo)
    @MethodReflectParams({"android.content.pm.ApplicationInfo","android.content.res.CompatibilityInfo"})
    public static RefMethod getPackageInfoNoCheck;

    public static class ActivityClientRecord{
        public static final Class<?> TYPE=RefClass.load(ActivityClientRecord.class,
                "android.app.ActivityThread$ActivityClientRecord");

        public static RefObject<IBinder> token;
        public static RefObject<Intent> intent;
        public static RefObject<Activity> activity;
    }
}
